program pbc
  use general
  implicit none
  integer,parameter :: NN=4
  integer :: i,iback
  do i=-2*NN,2*NN
    call foldback_pbc(iback,i,NN)
    write(*,*) iback,i,NN
  enddo
endprogram pbc
